package team.yg.asset.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import team.yg.asset.resful.Result;
import team.yg.asset.service.IUserService;
import team.yg.asset.vo.UserLoginVo;


/**
 * @author Eins
 * 登录模块
 * */
@RestController
@RequestMapping("/login")
@Slf4j
public class LoginController {

    @Resource
    private IUserService userService;

    @PostMapping
    public Result<UserLoginVo> login(String username, String password) {
        return userService.login(username,password);
    }
}
